﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

public enum UnitType{
    All,
    Monster,
    Hero,
}
public enum NullableBool
{
    Null,
    True,
    False,
}
/// <summary>
/// 单位选择器
/// </summary>
[CreateAssetMenu(fileName = "UnitSelectorSO", menuName = "CardGame/UnitSelectorSO")]
public class UnitSelectorSO: TargetSelectorSO
{
    public NullableBool IsMine;
    public NullableBool IsInjured;
    public NullableBool IsCharge;
    public NullableBool IsTaunt;
    /// <summary>
    /// TRUE表示攻击力大于，FALSE表示小于，null表示不比较攻击力
    /// </summary>
    public NullableBool AttackGreatThan;
    public int AttackArg;
    /// <summary>
    /// TRUE表示生命值大于，FALSE表示小于，null表示不比较生命值
    /// </summary>
    public NullableBool HealthGreatThan;
    public int HealthArg;

    public Element ElementType;

    public UnitType UnitType;

    public bool? Convert(NullableBool a)
    {
        switch (a)
        {
            case NullableBool.True:
                return true;
            case NullableBool.False:
                return false;
            default:
                return null;
        }
    }
}

